package com.atguigu.spring.aop.proxy.statics;

import com.atguigu.spring.aop.calculator.MathCalculator;
import lombok.Data;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

//@Component
@Data
public class MathCalculatorStaticProxy implements MathCalculator {
    private MathCalculator target;

    public MathCalculatorStaticProxy(MathCalculator target) {
        this.target = target;
    }


    @Override
    public int add(int a, int b) {
        int result = target.add(a, b);
        return result;
    }

    @Override
    public int subtract(int a, int b) {
        int result = target.subtract(a, b);
        return result;
    }

    @Override
    public int multiply(int a, int b) {
        int result = target.multiply(a, b);
        return result;
    }

    @Override
    public int divide(int a, int b) {
        int result = target.divide(a, b);
        return result;
    }
}
